<?php

class Registration_Controller extends Template_Controller {
    public function index(){
        if ($_POST) {
            $name       = $_POST['name'];
            $company    = $_POST['company'];
            $hcap       = $_POST['hcap'];
            $size       = $_POST['size'];
            $email      = $_POST['email'];

            $user = ORM::factory('user');

            $user->name     = $name;
            $user->company  = $company;
            $user->hcap     = $hcap;
            $user->size     = $size;
            $user->email    = $email;

            $user->save();

            url::redirect(url::base() . 'index.php/home/');
        }

        $this->title = "Registration";
    }
}
?>
